package com.spring.lazyInitialization;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class LazyInit {

  public static void main(String args[]) {
    BeanFactory beanfactory = new ClassPathXmlApplicationContext(
    "context.xml");
    System.out.println("Initialization done when require");
    Student student = (Student)beanfactory.getBean("studentBean");
    System.out.println(student);
  }
}